using System;
using System.Collections.Generic;
using GeneticAlgorithms.Alphabets;

namespace GeneticAlgorithms.Genomes
{
    /// <summary>
    /// Base generic interface for genomes.
    /// </summary>
    /// <typeparam name="TGene">The type of the gene.</typeparam>
    /// <remarks>
    /// In a genetic algorithm, each genome represents a coded solution
    /// to the problem that is being addressed.
    /// </remarks>
    public interface IGenome<TGene> : IEnumerable<TGene>, IGenomeBase, ICloneable
    {
        /// <summary>
        /// Gets the genome alphabet.
        /// </summary>
        /// <value>The genome alphabet.</value>
        /// <remarks>
        /// A genetic alphabet describes all values the genes may have.
        /// </remarks>
        IAlphabet<TGene> Alphabet { get; }

        /// <summary>
        /// Gets or sets the <paramref name="TGene"/> at the 
        /// specified <paramref name="index"/>.
        /// </summary>
        /// <param name="index">
        /// Index of the gene.
        /// </param>
        /// <value>
        /// The gene at the specified <paramref name="index"/>.
        /// </value>
        TGene this[int index] { get; set; }
    }
}
